﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using OpenChart.Entities;

namespace OpenChart.Check
{
    class PieChartChecking:AbsChecking
    {
        protected override void CheckChartTypeSpecificException()
        {
            if (this.ChartArea.Series.Count > 1)
            {
                throw new ChartException("饼图只能绘制一个Series");
            }
            if (this.ChartArea.Data.Columns[this.ChartArea.Series[0].YValueMember].DataType == typeof(DateTime))
            {
                throw new ChartException("饼图Series对应的YValueMember只能是数据类型的列");
            }
        }
    }
}
